package com.hxkj.domain.enums;

import com.google.common.collect.Lists;

import java.util.List;

/***
 * @author huangzhaoyong
 * @desc 银行枚举
 * @date  2019/1/15 0015 下午 13:15
 */
public enum BankEnum {
    ICBC_BANK("ICBC","工商银行"),
    CCB_BANK("CCB","建设银行"),
    ABC_BANK("ABC","农业银行"),
    PSBC_BANK("PSBC","邮政储蓄银行"),
    BOC_BANK("BOC","中国银行"),
    CMBC_BANK("CMBC","民生银行"),
    COMM_BANK("COMM","交通银行"),
    CEB_BANK("CEB","光大银行"),
    PINGANBK_BANK("PINGANBK","平安银行"),
    CITIC_BANK("CITIC","中信银行"),
    CIB_BANK("CIB","兴业银行"),
    CGB_BANK("CGB","广发银行"),
    BOBJ_BANK("BOBJ","北京银行"),
    CMB_BANK("CMB","招商银行"),
    SPDB_BANK("SPDB","浦发银行"),
    HXB_BANK("HXB","华夏银行"),
    BKSH_BANK("BKSH","上海银行"),
    CBHB_BANK("CBHB","渤海银行"),
    NJCB_BANK("NJCB","南京银行"),
    HZCB_BANK("HZCB","杭州银行"),
    ZHESHANGB_BANK("ZHESHANGB","浙商银行"),
    BOCD_BANK("BOCD","成都银行"),
    HSB_BANK("HSB","徽商银行"),
    EBCL_BANK("EBCL","恒丰银行"),
    BOGZ_BANK("BOGZ","贵州银行"),
    BTCB_BANK("BTCB","包商银行"),
    CQCB_BANK("CQCB","重庆银行"),
    CQRCB_BANK("CQRCB","重庆农商行"),
    CQTGB_BANK("CQTGB","重庆三峡银行"),
    CSRCB_BANK("CSRCB","常熟农商行"),
    FJNX_BANK("FJNX","福建农信"),
    GYCB_BANK("GYCB","贵阳银行"),
    GZCB_BANK("GZCB","广州银行"),
    GZRCB_BANK("GZRCB","广州农商行"),
    HBCB_BANK("HBCB","哈尔滨银行"),
    HUBNX_BANK("HUBNX","湖北农信社"),
    JSRCU_BANK("JSRCU","江苏农信社"),
    KMNL_BANK("KMNL","昆明农联"),
    MYCB_BANK("MYCB","绵阳商行"),
    QZCB_BANK("QZCB","泉州银行"),
    SDNX_BANK("SDNX","山东农信"),
    SXNX_BANK("SXNX","山西农信社"),
    SZBK_BANK("SZBK","苏州银行"),
    TZBK_BANK("TZBK","台州银行"),
    WHCB_BANK("WHCB","汉口银行"),
    YBYZB_BANK("YBYZB","重庆渝北银座村镇银行"),
    ZJRCB_BANK("ZJRCB","浙江农信"),
    ZZBK_BANK("ZZBK","郑州银行"),
    ;

    BankEnum(String code, String description) {
        this.code = code;
        this.description = description;
    }

    private String code;
    private String description;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public static String getDescriptionByCode(String code){
        for (BankEnum playTypeEnum : BankEnum.values()) {
            if(playTypeEnum.getCode().equals(code)){
                return playTypeEnum.getDescription();
            }
        }
        return "";
    }

    /**
     * 获取description集合
     * @return
     */
    public static List<String> getDescriptionList(){
        List<String> values = Lists.newArrayList();
        for (BankEnum bankEnum : BankEnum.values()) {
            values.add(bankEnum.description);
        }
        return values;
    }
}
